//
//  KBValueFormatter.m
//  RuiHeAppApp
//
//  Created by Yan Chen on 2023/10/13.
//

#import "KBValueFormatter.h"

@implementation KBValueFormatter{
    NSArray *_dateArr;
}
 
- (id)initWithDateArr:(NSArray *)arr {
    if (self = [super init]) {
        _dateArr = [NSArray arrayWithArray:arr];
    }
    return self;
}
 
- (NSString *)stringForValue:(double)value axis:(ChartAxisBase *)axis {
    if((NSInteger)value >= _dateArr.count) return @"";
    return _dateArr[(int)value];
}

@end
